# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libepoxy
pkgver=1.5.4
pkgrel=0
pkgdesc="Direct Rendering Manager runtime library"
url="https://github.com/anholt/libepoxy"
arch="all"
license="MIT"
options="!check"  # Requires dlvsym
depends_dev="libx11-dev mesa-dev"
makedepends="$depends_dev autoconf automake libtool util-macros python3"
subpackages="$pkgname-dev"
source="https://github.com/anholt/libepoxy/releases/download/$pkgver/libepoxy-$pkgver.tar.xz"

prepare() {
	default_prepare
	autoreconf -vif
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--mandir=/usr/share/man \
		--disable-static \
		--enable-shared
	make
}

check() {
	make check
}

package() {
	make install DESTDIR="$pkgdir"
}

sha512sums="7bde6fe7164aaa88b6e476dafb13391c551c530267936a1456e242d2bf648117f319788ba089100b3f773444098a894db6d27326b47dc4ae26db4766308d7510  libepoxy-1.5.4.tar.xz"
